﻿const Koa = require("koa");
const { koaBody } = require("koa-body");
const cors = require("koa2-cors");
const log4js = require("log4js");


const router = require("./routes");
require("./db");
require("./models/assocations");
// require("./models/category");
// require("./models/book");

const app = new Koa();

app.use(cors());
app.use(koaBody());
app.use(router());

app.listen(3000, () => {
  console.log("Server is running.");
});
